package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.SalesReturnDao;
import com.neuedu.model.SalesReturn;
import com.neuedu.service.SalesReturnService;

//配置一个spring的服务，把业务实现类交给spring进行管理，由spring完成依赖注入
@Service
public class SalesReturnServiceImpl implements SalesReturnService {

	//织入-依赖注入
	@Autowired
	private SalesReturnDao SalesReturnDao;
	
	
	public void setSalesReturnDao(SalesReturnDao salesReturnDao) {
		SalesReturnDao = salesReturnDao;
	}

	@Override
	public int countSalesReturn() {
		// TODO Auto-generated method stub
		return SalesReturnDao.countSalesReturn();
	}

	@Override
	public List<SalesReturn> findAll(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return SalesReturnDao.findAll(map);
	}

	@Override
	public int addSalesReturn(SalesReturn c) {
		// TODO Auto-generated method stub
		return SalesReturnDao.addSalesReturn(c);
	}

	@Override
	public int updateSalesReturn(SalesReturn c) {
		// TODO Auto-generated method stub
		return SalesReturnDao.updateSalesReturn(c);
	}

	@Override
	public int deleteSalesReturn(int id) {
		// TODO Auto-generated method stub
		return SalesReturnDao.deleteSalesReturn(id);
	}

}
